import React from "react";
import lazyLoad from "../components/common";
const Home = lazyLoad(()=>import('../components/Home/home'))
const Serve = lazyLoad(()=>import('../components/Serve/index'))
const Source = lazyLoad(()=>import('../components/Home/source'))
const BrandBook = lazyLoad(()=>import('../components/Home/source/all'))
const BuyBook = lazyLoad(()=>import('../components/Serve/Buybook/index'))
const Feedback = lazyLoad(()=>import('../components/Serve/Feedback/index'))
const Gen = lazyLoad(()=>import('../components/Serve/Genuine/index'))
const Plat = lazyLoad(()=>import('../components/Serve/Platform/index'))
const My = lazyLoad(()=>import('../components/My/My'))
const Login = lazyLoad(()=>import('../components/Login/index'))
const Collect =lazyLoad( ()=>import("../components/My/allSwitch/collect/Collect"))
const Book =lazyLoad( ()=>import("../components/My/allSwitch/book/Book"))
const Star =lazyLoad( ()=>import("../components/My/allSwitch/star/Star"))
const Back =lazyLoad( ()=>import("../components/My/allSwitch/back/Back"))
const Info =lazyLoad( ()=>import("../components/My/allSwitch/info/Info"))
const Us =lazyLoad( ()=>import("../components/My/allSwitch/us/Us"))
const Set =lazyLoad( ()=>import("../components/My/allSwitch/set/Set"))
const UserHttp =lazyLoad( ()=>import("../components/My/allSwitch/userHttp/UserHttp"))
const PriHttp =lazyLoad( ()=>import("../components/My/allSwitch/priHttp/PriHttp"))
const routers = [
    {
        path:"/home",
        component:Home,
        routes:[
            {
                path:"/home/source",
                exact:true,
                component: Source
            },
            {
                path:"/home/brandBook",
                exact:true,
                component: BrandBook
            }
        ]
    },
    {
        path:"/serve",
        component:Serve,
        routes:[
            {
                path:"/serve/buybook",
                exact:true,
                component: BuyBook
            },
            {
                path:"/serve/feedback",
                exact:true,
                component: Feedback
            },
            {
                path:"/serve/gen",
                exact:true,
                component: Gen
            },
            {
                path:"/serve/Plat",
                exact:true,
                component: Plat
            }
        ]
    },
    {
        path:'/my',
        component:My,
        routes: [
            {
                path:'/my/login',
                exact: true,
                component: Login,
            },
            {
                path:'/my/collect',
                exact: true,
                component: Collect,
            },
            {
                path:'/my/book',
                exact: true,
                component: Book,
            },
            {
                path:'/my/star',
                exact: true,
                component: Star,
            },
            {
                path:'/my/back',
                exact: true,
                component: Back,
            },
            {
                path:'/my/info',
                exact: true,
                component: Info,
            },
            {
                path:'/my/us',
                component: Us,
                routes:[
                    {
                        path:'/my/us/userHttp',
                        exact: true,
                        component: UserHttp,
                    },
                    {
                        path:'/my/us/riHttp',
                        exact: true,
                        component: PriHttp,
                    },
                ]
            },
            {
                path:'/my/set',
                exact: true,
                component: Set,
            },
        ]
    }
];
export default routers